package org.chinarjy.service;

import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.chinarjy.api.PersonSkillApi;
import org.chinarjy.dto.PersonSkillDto;
import org.chinarjy.dto.PersonSkillInfo;
import org.chinarjy.dto.ResultApi;
import org.chinarjy.mapper.PersonSkillMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Slf4j
@DubboService
@Component
public class PersonSkillService implements PersonSkillApi {

    @Autowired
    PersonSkillMapper personSkillMapper;
    @Override
    public ResultApi<List<PersonSkillInfo>> getAllPersonSkillInfo(){
        return ResultApi.success(personSkillMapper.getAllPersonSkillInfo());
    }

    @Override
    public ResultApi<List<PersonSkillDto>> getAllPersonSkillDto(){
        log.info("SkillService -->> getAllPersonSkillDto()");
        List<PersonSkillDto> personSkillDtos = personSkillMapper.getAllPersonSkillDto();
        return ResultApi.success(personSkillDtos);
    }


}
